<?php
	include ("../include/config.php");	
	$str = "SELECT * FROM tbl_center WHERE 1";
	$result = mysql_query("$str") or die("Invalid query: " . mysql_error());
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
		<title>Admin System</title>
		<link rel="stylesheet" href="css/960.css" type="text/css" media="screen" charset="utf-8" />
		<!--<link rel="stylesheet" href="css/fluid.css" type="text/css" media="screen" charset="utf-8" />-->
		<link rel="stylesheet" href="css/template.css" type="text/css" media="screen" charset="utf-8" />
		<link rel="stylesheet" href="css/colour.css" type="text/css" media="screen" charset="utf-8" />
	</head>
	<body>
		
		<h1 id="head">Admin System</h1>
		
		<?php include ("menu.php");?>
		
			<div id="content" class="container_16 clearfix">
				<div class="grid_4">
					<p>
						<label>Center<small></small></label>
						<input type="text" />
					</p>
				</div>
				<div class="grid_5">
					<p>
						<label>Description</label>
						<input type="text" />
					</p>
				</div>
				<div class="grid_5">
					<p>
						<label>Status</label>
						<select>
							<option>Active</option>
							<option>Non-Active</option>
						</select>
					</p>
				</div>
				<div class="grid_2">
					<p>
						<label>&nbsp;</label>
						<input type="submit" value="Search" />
					</p>
				</div>
				<form action = "centernew.php" name = "2">
				<div class="grid_2">
					<p>
						<label>&nbsp;</label>
						<input type="submit" value="Create New" />
					</p>
				</div>
				</form>	
				<div class="grid_16">
					<table>
						<thead>
							<tr>
								<th>Center name</th>
								<th>Center Description</th>
								<th>Center Address</th>
								<th>Center Website</th>
								
								<th colspan="2" width="10%">Actions</th>
							</tr>
						</thead>
						<tfoot>
							<tr>
								<td colspan="5" class="pagination">
									<span class="active curved">1</span><a href="#" class="curved">2</a><a href="#" class="curved">3</a><a href="#" class="curved">4</a> ... <a href="#" class="curved">10</a>
								</td>
							</tr>
						</tfoot>
						<?php 
							while($row=mysql_fetch_array($result)){
									echo '
										<tbody>
											<tr>
												<td>'.$row["name"].'</td>
												<td>'.$row["description"].'</td>
												<td>'.$row["address"].'</td>
												<td>'.$row["website"].'</td>
												<td><a href="centeredit.php?centerId='.$row["centerID"].'" class="edit">Edit</a></td>
												<td><a href="centerdelete.php?centerId='.$row["centerID"].'" class="delete">Delete</a></td>
											</tr>
										</tbody>									
									';
							}
						?>

					</table>
				</div>
			</div>
		
		<div id="foot">
					<a href="#">Contact Me</a>
				
		</div>
	</body>
</html>